TalentSync

AI resume builder and ATS optimizer for job seekers. Tailored resumes, outreach, and interview prep from one profile.

System architecture

The system architecture of TalentSync.

  • Frontend: Next.js application serving the user interface and client-side logic.
  • Backend: FastAPI service exposing REST APIs and orchestrating AI/ML workflows.
  • AI/ML Service: Integrated LangChain-based pipeline for resume analysis, ATS evaluation, cover letter generation, cold outreach, and interview assistance.
  • Database: PostgreSQL storing user data, resumes, analyses, and related artifacts.

The platform is containerized with Docker and orchestrated via docker-compose. It supports development and production deployments with distinct compose configurations.

Repository layout#

The repository is organized into four major areas:

  • frontend: Next.js application with TypeScript, Prisma ORM, and UI components.
  • backend: FastAPI application with routing, middleware, AI/ML integrations, and data models.
  • analysis: Jupyter notebook and ML assets for resume analysis experiments. -.github/workflows: CI/CD pipeline configuration for deployment.

Building blocks#

  • Frontend (Next.js)
  • Responsible for presentation, user interactions, and API consumption.
  • Uses Prisma for some public tables. Auth is Google OAuth on FastAPI.
  • Built with a multi-stage Dockerfile optimized for production.
  • Backend (FastAPI)
  • Exposes REST endpoints under /api/v1 and /api/v2.
  • Implements request ID tracing, request/response logging, and CORS.
  • Integrates LangChain for AI/ML workflows and supports multiple LLM providers.
  • AI/ML Service
  • LangChain graphs and agents for structured workflows (e.g., ATS evaluation).
  • Supports tooling (e.g., Tavily search) and provider-agnostic LLM selection.
  • Database (PostgreSQL)
  • Schema includes users, roles, resumes, analyses, interview requests, and LLM configurations.
  • Migrations and seeding orchestrated during container startup.

How it fits together#

The system employs a separate layers:

  • Presentation Layer: Next.js handles UI rendering, routing, and client-side state.
  • Business Logic Layer: FastAPI manages authentication, request validation, orchestration, and persistence via Prisma.
  • Data Layer: PostgreSQL persists all application data with Prisma-generated client.

Communication patterns:

  • Frontend communicates with Backend via HTTP REST endpoints.
  • Backend integrates with external LLM providers through LangChain abstractions.
  • Database access is performed through Prisma ORM in the frontend and backend.

Frontend (Next.js)#

  • Technology stack includes Next.js, Prisma, FastAPI cookie session, Radix UI, and Recharts.
  • Multi-stage Docker build optimizes production image size and startup time.
  • Environment variables include database URL, backend URL, OAuth credentials, and analytics keys.
  • Layout composes providers and content for consistent theming and state.

Backend (FastAPI)#

  • Centralized application factory with lifecycle hooks, middleware, and CORS.
  • Routes grouped by feature (ATS, resume analysis, hiring assistant, cover letter, etc.) across v1 and v2.
  • LLM configuration supports multiple providers (OpenAI, Anthropic, Google, Ollama, OpenRouter, DeepSeek).
  • Structured logging and request tracing for observability.

AI/ML integration (LangChain)#

  • Provider-agnostic LLM creation with temperature support and fallbacks.
  • ATSEvaluatorGraph composes a LangGraph workflow with optional tool binding (e.g., Tavily search).
  • JSON extraction and error handling for structured outputs.

Database model (Prisma)#

  • Entities include Role, User, Resume, Analysis, InterviewRequest, LlmConfig, and OAuth-related models.
  • Relationships define ownership and cascading deletes for coherent data integrity.
  • Indexes and unique constraints optimize queries and enforce uniqueness.

Dependencies#

Containerization and orchestration:

  • docker-compose defines three services: db, backend, and frontend.
  • Frontend exposes port 3000 and depends on backend and db.
  • Production compose adds a one-time migration stage and external network integration.

Technology stack dependencies:

  • Backend: FastAPI, LangChain, LangChain providers, Pydantic settings, NumPy, SSE Starlette, HTTPX, cryptography.
  • Frontend: Next.js, Prisma, jose session helper, Radix UI, Recharts, PostHog, Tailwind.

Performance#

  • Container builds
  • Frontend uses a multi-stage Dockerfile to minimize production image size and improve cold start times.
  • Backend uses uv for faster dependency installation and exposes port 8000.
  • Observability
  • Request ID propagation and request/response logging enable tracing and debugging.
  • AI/ML throughput
  • Provider-agnostic LLM selection allows tuning for latency or cost.
  • LangGraph workflows can be parallelized where safe and appropriate.
  • Database scaling
  • PostgreSQL is configured with a persistent volume for durability.
  • Consider read replicas and connection pooling for high concurrency.

[No sources needed since this section provides general guidance]

Troubleshooting#

  • Environment variables
  • Ensure DATABASE_URL, BACKEND_URL, JWT_SECRET, BACKEND_JWT_SECRET, Google OAuth, and LLM keys match across services.
  • Health checks
  • Production compose includes a health check for the database service.
  • Migration failures
  • The frontend migration stage runs Prisma migrations once; verify logs if startup fails.
  • LLM availability
  • If default provider keys are missing, LLM functionality may be disabled; configure provider settings accordingly.